package com.beamfield.dao.sys;

import com.beamfield.model.AdminInfo;
import com.beamfield.modelVo.AdminInfoVo;
import com.beamfield.modelVo.MenuLevelChild;
import com.beamfield.modelVo.MenuLevelOne;
import com.beamfield.modelVo.OperatorVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Component
public interface AdminInfoMapper {
    int deleteByPrimaryKey(Long admin_id);

    int insert(AdminInfo record);

    int insertSelective(AdminInfo record);

    AdminInfo selectByPrimaryKey(Long admin_id);

    int updateByPrimaryKeySelective(AdminInfo record);

    int updateByPrimaryKey(AdminInfo record);

    List<AdminInfoVo> getAdminInfoData(@Param("offset") String offset, @Param("limit") String limit, @Param("beamId") Long beamId,@Param("name") String name);

    long countAdminInfoData(@Param("beamId") Long beamId, @Param("name") String name);

    List<OperatorVo> getOperatorData(@Param("offset") String offset, @Param("limit") String limit, @Param("beamId") Long beamId, @Param("type") String type,@Param("name") String name);

    long countOperatorData(@Param("beamId") Long beamId, @Param("type") String type,@Param("name") String name);

    List<AdminInfo> selectByLoginName(@Param("login_name")String login_name,@Param("beam_id") Long beam_id);

    List<Map<String,String>> getRole(@Param("beam_id") String beamId, @Param("type") String type);

    List<MenuLevelChild> getAllMenuByRoleId(@Param("roleId") Long roleId);

    List<MenuLevelOne> getMenuLevelOne(Long roleId);
    
    List<MenuLevelChild> getMenuLevelTwo(@Param("fid") Integer fid,@Param("roleId") Long roleId);
    
    List<MenuLevelChild> getMenuLevelThird(@Param("fid") Integer fid,@Param("roleId") Long roleId);

    List<MenuLevelChild> getMenuLevelFour(@Param("fid") Integer fid,@Param("roleId") Long roleId);

    List<AdminInfoVo> getCompanyUserData(@Param("offset") String offset,@Param("limit") String limit,@Param("name") String name);

    long countCompanyUserData(@Param("name") String name);

    String selectByEcode(@Param("ecode") String ecode);
}